﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ConvergenceTheme.Master" Inherits="System.Web.Mvc.ViewPage<elfam.web.Paging.TableModel<elfam.web.Models.Income>>" %>
<%@ Import Namespace="elfam.web.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	List
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>List</h2>
    <table class="box-table-b">
        <thead>
            <th><%= Model.Header("Товар", "Product.Name") %></th>
            <th><%= Model.Header("Кол-во текущее", "QuantityCurrent")%></th>
            <th><%= Model.Header("Кол-во начальное", "QuantityInital")%></th>
            <th><%= Model.Header("Дата", "Date")%></th>
        </thead>
    
    <% foreach (Income item in Model.Models) {%>
  
    <tr>
        <td><a href="/Product/Details/<%= item.Product.Id %>"><%= item.Product.Name %> (id=<%= item.Product.Id %>)</a></td>
        <td><%= item.QuantityCurrent %></td>
        <td><%= item.QuantityInital %></td>
        <td><%= item.Date.ToShortDateString() %></td>
    </tr>
    
    <% } %>
    </table>
    <%= Model.Pager() %>
</asp:Content>
